<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{baseui/head :: head}">
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content="动检通智慧云平台"/>
    <meta name="author" content="牧中(上海)物联网科技有限公司"/>
    <link rel="shortcut icon" href="/webjars/images/favicon.png"/>

    <title>牧中畜牧业大数据智慧云平台V1.0</title>


</head>
<body>
<style>
    body{text-align:left;}

    .down_line{
        border-bottom:1px solid #000000;
        width:200px;
        color:#000000;
        font-family:"微软雅黑";
        font-size: 20px;
        font-weight: normal;
        text-decoration: none;
    }

    .A_28_hei{
        color:#000000;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 28px;
        font-weight: bold;
        text-decoration: none;
    }

    .A_20_hei{
        color:#000000;
        font-family:"微软雅黑";
        font-size: 20px;
        font-weight: normal;
        text-decoration: none;
    }
    .A_18_hei{
        color:#000000;
        font-family:"微软雅黑";
        font-size: 18px;
        font-weight: normal;
        text-decoration: none;
    }

    .A_16_hei{
        color:#000000;
        font-family:"微软雅黑";
        font-size: 16px;
        font-weight: normal;
        text-decoration: none;
    }

    .A_22_hei{
        color:#000000;
        font-family:Arial, Helvetica, sans-serif;
        font-size: 22px;
        font-weight: normal;
        text-decoration: none;
    }
    .A_20_red{
        font-family:Arial, Helvetica, sans-serif;
        font-size: 20px;
        font-weight: bold;
        text-decoration: none;
    }
    .red{
        color:#B22222;
    }

    .black{
        color:#000000;
    }
    .A_12_hei{
        color:#000000;
        font-family:Arial, Helvetica, sans-serif;
        font-size: 12px;
        font-weight: normal;
        text-decoration: none;
    }

    .webBeian_cont  td{
        border:1px solid #000;
        height:25px;
        line-height:25px;
        font-family:Arial, Helvetica, sans-serif;
        font-size: 15px;
    }
    .webBeian_cont .tdBg{
        font-size: 15px;
        text-align: center;
        color:#B22222;
        font-weight: bold;
        font-family:Arial, Helvetica, sans-serif;
    }

    .webBeian_cont{
        border:0px;
    }
    .webBeian_cont .manyTd {
        white-space: normal;
        word-break: break-all;
    }
    .tb td {

        border:0px;
    }
    .tb td:last-child{
        border:0px;
    }
</style>
<!--顶部一级导航-->
<th:block th:replace="baseui/topheader :: topheader(1)"/>

<!--动检通菜单-->
<div id="topnav" th:replace="djt/partial/topnav :: topnav(7)"></div>


<div id="cl-wrapper">
    <!--左边导航-->
    <th:block th:replace="djt/partial/cert_left :: nav(21)" />

    <div class="container-fluid" id="pcont">

        <table class="tb"  align="center" style="margin-top: 50px; width:660px;" border="0" cellspacing="0" cellpadding="0">
            <tbody><tr>
                <td align="center" colspan="2" style="height:72px;text-align: center;" valign="middle">
                    <span class="A_28_hei red">动物检疫合格证明</span><span class="A_20_red">（动物B）</span>
                </td>
            </tr>
            <tr>
                <td class="tdBg"></td>
                <td width="60%" class="A_20_hei" style="text-align:right;height:40px;">
                    <label>编号：</label> <span class="A_20_red red">№.<span th:text="${formDto.breedReport.number}">3378623498</span></span>
                </td>
            </tr>
            </tbody></table>
        <table class="webBeian_cont" style="width:800px;" align="center">
            <tbody><tr>
                <td class="tdBg" width="10%"><label>货主：</label></td>
                <td width="35.5%" colspan="2" th:text="${formDto.breedReport.userName}">
                    陈存根</td>
                <td class="tdBg" width="10%"><label>联系电话：</label></td>
                <td width="35.5%" colspan="2" th:text="${formDto.breedReport.userMobile}">
                    13056816065</td>
                <td rowspan="13" style="border:0;border-left:1px solid #000;">
                    第<br><br>一<br><br>联<br><br><br><br><br><br><br><br><br><br><br>
                    共<br><br>两<br><br>联
                </td>
            </tr>

            <tr>
                <td class="tdBg" width="10%"><label>动物名称：</label></td>
                <td width="25%" th:switch="${formDto.breedReport.breedType}">
                    <span th:case="1">猪</span>
                    <span th:case="2">牛</span>
                    <span th:case="3">羊</span>
                    <span th:case="4">家禽</span>
                </td>
                <td class="tdBg" width="10%"><label>数量及单位：</label></td>
                <td width="25%" th:switch="${formDto.breedReport.unit}">
                    <span th:case="1" th:text="${formDto.breedReport.quantity}+'头'"></span>
                    <span th:case="2" th:text="${formDto.breedReport.quantity}+'只'"></span>
                    <span th:case="3" th:text="${formDto.breedReport.quantity}+'羽'"></span>
                    <span th:case="4" th:text="${formDto.breedReport.quantity}+'克'"></span>
                    <span th:case="5" th:text="${formDto.breedReport.quantity}+'毫升'"></span>
                    <span th:case="6" th:text="${formDto.breedReport.quantity}+'头份'"></span>
                    <span th:case="7" th:text="${formDto.breedReport.quantity}+'kg'"></span>
                </td>
                <td class="tdBg" width="10%"><label>用途：</label></td>
                <td width="25%" th:switch="${formDto.breedReport.purposeType}">
                    <span th:case="60">其他</span>
                    <span th:case="10">饲养</span>
                    <span th:case="20">屠宰</span>
                    <span th:case="30">展览</span>
                    <span th:case="40">演出</span>
                    <span th:case="50">比赛</span>
                </td>
            </tr>
            <tr>
                <td class="tdBg" width="10%"><label>启运地点：</label></td>
                <td width="85%" colspan="5" th:text="${formDto.startAddress}">
                    浙江省 宁波市  象山县 &nbsp;石浦镇象山县周金国猪场
                    &nbsp;(养殖场、交易市场)
                </td>
            </tr>
            <tr>
                <td class="tdBg" width="10%"><label>到达地点：</label></td>
                <td width="75%" colspan="5"  th:text="${formDto.receiveAddress}">
                    浙江省 宁波市  象山县 &nbsp;丹西街道丹西街道象山同泰畜禽屠宰中心
                    &nbsp;(养殖场、屠宰场、交易市场、村、养殖小区、其他)
                </td>
            </tr>
            <tr>
                <td class="tdBg" width="10%"> 牲畜耳标号</td>
                <td colspan="5" style="height:40px" class="manyTd" >
                   <span th:each=" number,state:${formDto.breedReport.earTagNumbers}">
                        <span th:text="${number}"></span>
                    </span>
                </td>
            </tr>
            <tr>
                <td colspan="3" style="border-right:0;border-bottom:0;"><font class="tdBg">本批动物经检疫合格，应于当日内到达有效。</font>
                </td>
                <td width="35.5%" colspan="3" style="border:0;border-top:1px solid #000;">&nbsp;</td>
            </tr>
            <tr>
                <td width="50%" colspan="3" style="border:0;border-left:1px solid #000;">&nbsp;</td>
                <td width="50%" colspan="3" style="border:0;text-align:left;">
                    <font class="tdBg">  官方兽医签字：</font>
                    <span th:text="${formDto.breedReportSurveyRecord==''?'':formDto.breedReportSurveyRecord.vetUserName}">顾启睿</span></td>
            </tr>
            <tr>
                <td width="50%" colspan="3" style="border:0;border-left:1px solid #000;">&nbsp;</td>
                <td width="50%" colspan="3" style=";border:0;text-align:left;">
                    <font class="tdBg">签发日期：</font>
                    <span id="starttime">2017-07-25 18:10</span></td>
            </tr>
            <tr>
                <td class="tdBg" width="50%" colspan="3" style="border:0;border-left:1px solid #000;">&nbsp;</td>
                <td class="tdBg" width="50%" colspan="3" style="border:0;text-align:left;">
                    （动物卫生监督所检疫专用章）
                </td>
            </tr>

            </tbody></table>
        <table  class="tb" border="0"  align="center" style="width:800px;">
            <tbody><tr>
                <td class="A_12_hei">
                    注：1.本书一式两联，第一联随货同行，第二联由动物卫生监督所留存。<br><br>
                    2.本证书限境内使用。<br><br>
                    3.牲畜耳标号只需填写后3位，可另附纸填写，需注明本检疫证明编号，同时加盖动物卫生监督机构检疫专用章。<br></td>
            </tr>
            </tbody></table>
        <div class="Noprint" align="center">
            <button type="button" class="btn btn-primary" onclick="history.back()">返回</button>
        </div>
    </div>
</div>

<script type="text/javascript" src="/webjars/js/jquery.js"></script>


<script type="text/javascript" src="/webjars/js/jquery.nanoscroller/jquery.nanoscroller.js"></script>
<script type="text/javascript" src="/webjars/js/behaviour/general.js"></script>
<script src="/webjars/js/jquery.ui/jquery-ui.js" type="text/javascript"></script>

<script type="text/javascript" src="/webjars/js/jquery.nestable/jquery.nestable.js"></script>
<script type="text/javascript" src="/webjars/js/bootstrap.switch/bootstrap-switch.min.js"></script>
<script type="text/javascript" src="/webjars/js/bootstrap.datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script src="//cdn.bootcss.com/select2/3.4.5/select2.min.js" type="text/javascript"></script>

<script src="/webjars/js/bootstrap.slider/js/bootstrap-slider.js" type="text/javascript"></script>
<script type="text/javascript" src="/webjars/js/jquery.niftymodals/js/jquery.modalEffects.js"></script>
<script type="text/javascript" src="/webjars/js/bootstrap.summernote/dist/summernote.min.js"></script>

<script type="text/javascript" src="/webjars/js/jquery.magnific-popup/dist/jquery.magnific-popup.min.js"></script>



<script src="/webjars/js/behaviour/voice-commands.js"></script>
<script src="/webjars/js/bootstrap/dist/js/bootstrap.min.js"></script>



<script type="text/javascript">
    $(document).ready(function(){

        App.init();
        $.ajax({
            type: "GET",
            url: "/djt/cert/animalbajax?id="+$("#id").val(),
            dataType: "json",
            success: function (data) {
                showtransportation(data.report.transportation);
                showtime(data.report.receiveAt,data.report.deliverAt);
                ShowDate(data.report.deliverAt);
            }
        })
    });


    function showtransportation(transportation) {

        switch (Number(transportation)) {
            case 1 :
                $("#tp1").attr("checked", "checked");
                break;
            case 2 :
                $("#tp2").attr("checked", "checked");
                break;
            case 3 :
                $("#tp3").attr("checked", "checked");
                break;
            case 4 :
                $("#tp4").attr("checked", "checked");
                break;
            case 5 :
                $("#tp5").attr("checked", "checked");
                break;
            case 6 :
                $("#tp6").attr("checked", "checked");
                break;
        }
    }

    function showtime(time1,time2) {
        var date1 = new Date(time1);
        var date2 = new Date(time2);
        var time = date1.getTime() - date2.getTime();
        time = time / (1000 * 3600 * 24);
        switch (parseInt(time)+1) {
            case 1 :
                $("#date").text("壹");
                break;
            case 2 :
                $("#date").text("贰");
                break;
            case 3 :
                $("#date").text("叁");
                break;
            case 4 :
                $("#date").text("肆");
                break;
            case 5 :
                $("#date").text("伍");
                break;
            case 6 :
                $("#date").text("陸");
                break;
            case 7 :
                $("#date").text("柒");
                break;
            case 8 :
                $("#date").text("捌");
                break;
            case 9 :
                $("#date").text("玖");
                break;
        }
    }
    function ShowDate(date) {
        if (date != null && date != "") {
            var timestamp4 = new Date(date);
            var dt = timestamp4.toLocaleDateString().replace(/\//g, "-") + " " + timestamp4.toTimeString().substr(0, 8);
            $("#starttime").text(dt);
        } else {
            $("#starttime").text();
        }
    }

</script>

</body>
</html>
